    <script type="text/javascript" src="<?=base_url('data/js/jquery.validate.min.js')?>"></script>
    <script type="text/javascript">
        $(document).ready(function(){
        var rules_set = {required:true,number:true};
        $('#myform').validate({
                rules: {
                    cash: rules_set,
                    visa: rules_set,
                    master: rules_set,
                    bca_card: rules_set,
                    debit: rules_set,
                    city_ledger: rules_set,
                    voucher: rules_set
                }
            }); 
        });
    </script>

    <style>
        #paymentdata input{width: 100px;}
        #paymentdata {border-collapse: collapse;}
        #paymentdata th {
            text-align: left;
            text-decoration: underline;
        }
        #paymentdata .arrow{
            width: 40px;
            text-align: center;
        }
        #paymentdata .label{
            font-style: italic;
            width: 130px;
        }
        #paymentdata .original{
            font-weight: bolder;
            width: 100px;
        }
        .content-item {margin-left: 30px;}
    </style>
    
    <title>Edit Payment</title>
</head>

<body onload="getTime();">

    <div id="container">
        <div id="header">
            <div id="logoHeader"></div>
            <div id="accountName">
                <div id="accountInfo">
                <p><b><span id="date"></span>&nbsp;<span id="clock"></span></b></p>
                <br />
                <p><i>Selamat Datang, <?php echo $nama_akun; ?></i></p>
                </div>
            </div>
            <br class="clearfloat"/>
        </div>
        <!-- end #header -->
        <div id="naviLink">
            <ul id="navUL">
                <li><a href="<?php echo site_url('main/beranda');?>">Beranda</a></li>
                <li><a href="<?php echo site_url('main/admin');?>">Admin</a></li>
                <li><a href="<?php echo site_url('main/penjualan');?>">Penjualan</a></li>
                <li><a href="<?php echo site_url('main/inventaris');?>">Inventaris</a></li>
                <li><a href="<?php echo site_url('main/pembelian');?>">Pembelian</a></li>
                <li><a href="<?php echo site_url('main/log');?>">Log</a></li>
            </ul>
            <div id="divLogOut"><a href="<?php echo site_url('main/log_out');?>">Log Out</a></div>
        </div>
        <div id="mainContent">

            <div id="contentInfo">
                <div id="adminInfo">
                        <a>Penjualan</a>
                </div>
                <br class="clearfloat" />       
            </div>

            <div class="content-item" style="font-size:20px;font-weight:bolder;">
                Laporan pembayaran <?php echo strtoupper($resto); ?> pada tanggal <?php echo $date; ?>
            </div>
            
            <br />
            
            <?php
                if(is_null($acc)) echo "<div class='content-item' style='font-style: italic'>Laporan belum pernah diubah oleh siapapun</div>";
                else echo "<div class='content-item' style='font-style: italic'>Laporan telah diubah oleh <span style='font-weight:bolder'>{$acc['user_name']} ({$acc['acc_name']})</span></div>";
            ?>
            
            <br />
            
            <form id="myform" method="post">
                <input type="hidden" name="date" value="<?=$date?>" />
                <table id="paymentdata">
                    <tr>
                        <th>Item</th>
                        <th>Original</th>
                        <th></th>
                        <th>Modifikasi</th>
                    </tr>
                    <tr>
                        <td class="label">Cash<?=($payment_ori['cash']!=$payment_mod['cash'])?'*':''?></td>
                        <td class="original"><?=$payment_ori['cash']?></td>
                        <td class="arrow"><img src="<?=base_url('data/img/arrow_right_24.png')?>" title="Ubah menjadi" /></td>
                        <td><input type="text" id="cash" name="cash" value="<?=$payment_mod['cash']?>"></td>
                    </tr>
                    <tr>
                        <td class="label">Visa<?=($payment_ori['visa']!=$payment_mod['visa'])?'*':''?></td>
                        <td class="original"><?=$payment_ori['visa']?></td>
                        <td class="arrow"><img src="<?=base_url('data/img/arrow_right_24.png')?>" title="Ubah menjadi" /></td>
                        <td><input type="text" id="visa" name="visa" value="<?=$payment_mod['visa']?>"></td>
                    </tr>
                    <tr>
                        <td class="label">Master<?=($payment_ori['master']!=$payment_mod['master'])?'*':''?></td>
                        <td class="original"><?=$payment_ori['master']?></td>
                        <td class="arrow"><img src="<?=base_url('data/img/arrow_right_24.png')?>" title="Ubah menjadi" /></td>
                        <td><input type="text" id="master" name="master" value="<?=$payment_mod['master']?>"></td>
                    </tr>
                    <tr>
                        <td class="label">BCA Card<?=($payment_ori['bca_card']!=$payment_mod['bca_card'])?'*':''?></td>
                        <td class="original"><?=$payment_ori['bca_card']?></td>
                        <td class="arrow"><img src="<?=base_url('data/img/arrow_right_24.png')?>" title="Ubah menjadi" /></td>
                        <td><input type="text" id="bca_card" name="bca_card" value="<?=$payment_mod['bca_card']?>"></td>
                    </tr>
                    <tr>
                        <td class="label">Debit<?=($payment_ori['debit']!=$payment_mod['debit'])?'*':''?></td>
                        <td class="original"><?=$payment_ori['debit']?></td>
                        <td class="arrow"><img src="<?=base_url('data/img/arrow_right_24.png')?>" title="Ubah menjadi" /></td>
                        <td><input type="text" id="debit" name="debit" value="<?=$payment_mod['debit']?>"></td>
                    </tr>
                    <tr>
                        <td class="label">City Ledger<?=($payment_ori['city_ledger']!=$payment_mod['city_ledger'])?'*':''?></td>
                        <td class="original"><?=$payment_ori['city_ledger']?></td>
                        <td class="arrow"><img src="<?=base_url('data/img/arrow_right_24.png')?>" title="Ubah menjadi" /></td>
                        <td><input type="text" id="city_ledger" name="city_ledger" value="<?=$payment_mod['city_ledger']?>"></td>
                    </tr>
                    <tr>
                        <td class="label">Voucher<?=($payment_ori['voucher']!=$payment_mod['voucher'])?'*':''?></td>
                        <td class="original"><?=$payment_ori['voucher']?></td>
                        <td class="arrow"><img src="<?=base_url('data/img/arrow_right_24.png')?>" title="Ubah menjadi" /></td>
                        <td><input type="text" id="voucher" name="voucher" value="<?=$payment_mod['voucher']?>"></td>
                    </tr>
                </table>
                <div class="content-item" style="margin-top: 15px;">
                    <input type="submit" name="submit" value="Simpan" />
                    <input type="button" value="Kembali" onclick="window.location = '<?=site_url('main/penjualan')?>'" />
                </div>
            </form>
        </div>